import java.util.Arrays;

/**
 * @author LKQ
 * @date 2022/2/28 13:51
 * @description
 */
public class Solution {
    public static void main(String[] args) {
        Solution solution = new Solution();
        int[] arr = {9,7,8,7,7,8,4,4,6,8,8,7,6,8,8,9,2,6,0,0,1,10,8,6,3,3,5,1,10,9,0,7,10,0,10,4,1,10,6,9,3,6,0,0,2,7,0,6,7,2,9,7,7,3,0,1,6,1,10,3};
        System.out.println(solution.trimMean(arr));
    }
    public double trimMean(int[] arr) {
        int n = arr.length;
        Arrays.sort(arr);
        int left = n * 5 / 100, right = n - n * 5 / 100;
        double res = 0.0;
        for (int i = left; i < right; i++) {
            res += arr[i];
        }
        return res / (right - left);
    }
}
